<!DOCTYPE html>

<html class="theme-next use-motion" lang="zh-Hans" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" layout:decorate="~{theme/next/layout}">
<head>
    <meta name="generator" content="Hexo 3.8.0">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="theme-color" content="#222">
    <meta http-equiv="Cache-Control" content="no-transform">
    <meta http-equiv="Cache-Control" content="no-siteapp">
    <title>文章 | [[${#servletContext.getAttribute('configMap')['blog_name']}]]</title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

<div layout:fragment="content">
    <div id="content" class="content">

        <div class="post-block category">

            <div id="posts" class="posts-collapse">
                <div class="collection-title">
                    <h2 th:text="${name}"><small th:text="${type}"></small></h2>
                </div>
                <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article" th:each="data : ${pageInfo.list}">
                    <header class="post-header">
                        <h3 class="post-title">
                            <a class="post-title-link" th:href="@{'/' + ${data.link}}" itemprop="url">
                                <span itemprop="name" th:text="${data.title}"></span>
                            </a>
                        </h3>
                        <div class="post-meta">
                            <time class="post-time" itemprop="dateCreated" th:datetime="${data.publishDate}"
                                  th:content="${data.year} + '-' + ${data.month} + '-' + ${data.day}"
                                  th:text="${data.month} + '-' + ${data.day}"></time>
                        </div>
                    </header>
                </article>
            </div>
        </div>

        <nav class="pagination" th:if="${type == '分类'}">
            <span th:if="${pageInfo.hasPreviousPage}">
                <a class="extend prev" rel="prev" th:href="@{${pageInfo.pageNum-1} == 1 ? '/categories/' + ${name} + '/': '/categories/' + ${name} + '/page/' + ${pageInfo.pageNum-1}+'/'}"><i class="fa fa-angle-left"></i></a>
            </span>
            <span th:each="pageNum : ${pageInfo.navigatepageNums}">
                <span th:if="${pageNum == pageInfo.pageNum}">
                    <span class="page-number current" th:text="${pageNum}">1</span>
                </span>
                <span th:if="${pageNum != pageInfo.pageNum}">
                    <a class="page-number" th:href="@{${pageNum} == 1 ? '/categories/' + ${name} + '/': '/categories/' + ${name} + '/page/' + ${pageNum}+'/'}" th:text="${pageNum}">2</a>
                </span>
            </span>
            <span th:if="${pageInfo.hasNextPage}">
                <a class="extend next" rel="next" th:href="@{'/categories/' + ${name} + '/page/' +  ${pageInfo.pageNum+1}+'/'}" ><i class="fa fa-angle-right"></i></a>
            </span>
        </nav>
        <nav class="pagination" th:if="${type == '标签'}">
            <span th:if="${pageInfo.hasPreviousPage}">
                <a class="extend prev" rel="prev" th:href="@{${pageInfo.pageNum-1} == 1 ? '/tags/' + ${name} + '/': '/tags/' + ${name} + '/page/' + ${pageInfo.pageNum-1}+'/'}"><i class="fa fa-angle-left"></i></a>
            </span>
            <span th:each="pageNum : ${pageInfo.navigatepageNums}">
                <span th:if="${pageNum == pageInfo.pageNum}">
                    <span class="page-number current" th:text="${pageNum}">1</span>
                </span>
                <span th:if="${pageNum != pageInfo.pageNum}">
                    <a class="page-number" th:href="@{${pageNum} == 1 ? '/tags/' + ${name} + '/': '/tags/' + ${name} + '/page/' + ${pageNum}+'/'}" th:text="${pageNum}">2</a>
                </span>
            </span>
            <span th:if="${pageInfo.hasNextPage}">
                <a class="extend next" rel="next" th:href="@{'/tags/' + ${name} + '/page/' +  ${pageInfo.pageNum+1}+'/'}" ><i class="fa fa-angle-right"></i></a>
            </span>
        </nav>

    </div>
</div>
</body>
</html>
